package com.colter.project.years.question2017.month02;

public class Test1GetNumberCombination {
	/**
	 * 1 2 5组成100，一共有多少种组法。比如100个1,80个1，2个5等等
	 * 
	 * @param args
	 */

	public static void main(String[] args) {

		int total = 0;
		for (int i = 0; i <= 20; i++) {
			int remind = 100 - i * 5;
			int temp = remind / 2 + 1;// 剩余多少个2 就是多少种组合 同时要加上剩余全部是1的情况
			total += temp;
		}

		System.out.println(total);

		int test = 0;
		for (int i = 0; i <= 100; i++) {
			for (int j = 0; j <= 50; j++) {
				for (int k = 0; k <= 20; k++) {
					if (i * 1 + j * 2 + k * 5 == 100) {
						test++;
					}
				}
			}
		}
		System.out.println(test);
	}
}
